<?php
class Zend_View_Helper_PartialControl {
	private $_config = null;
	private $view = null;
	
	public function partialControl($name, $data) {
		if (! isset ( $this->_config ))
			$this->_config = Zend_Registry::get ( 'config' );
		return $this->view->partial ( 'controls' . $this->_config->controls->$name, array ('data' => $data ) );
	}
	
	public function setView(Zend_View_Interface $view) {
		$this->view = $view;
	}
}